package com.webviewh5.android

import android.support.test.InstrumentationRegistry
import android.support.test.runner.AndroidJUnit4
import com.shengjing.apk.network.ApiClient
import com.webviewh5.android.util.getValue
import io.reactivex.android.schedulers.AndroidSchedulers

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Before
import java.util.concurrent.CountDownLatch

/**
 * Instrumented test, which will execute on an Android device.
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
@RunWith(AndroidJUnit4::class)
class WebViewH5Test {
    val TAG = "LogPrintTest__"
    @Before
    fun init() {
        val appContext = InstrumentationRegistry.getTargetContext()
    }

    @Test
    fun testWeatherApi() {
        val value = getValue(ApiClient.MAIN_RETRO.loadData("372330"))
        println("testWeatherApi $value")
    }

    @Test
    fun testLoginApi() {
        val value = getValue(ApiClient.MAIN_RETRO.loginThirdPart("test", "test", "test"))
        println("testLoginApi $value")
    }
}
